package com.jnzc.ocr.serv.shop.service;

import com.jnzc.ocr.common.bean.Tree;
import com.jnzc.ocr.dependencies.serv.mybatis.MybatisService;
import com.jnzc.ocr.serv.shop.entity.ShopProduct;
import com.jnzc.ocr.serv.shop.entity.ShopProductAttr;
import com.jnzc.ocr.serv.shop.filter.ShopProductAttrFilter;
import com.jnzc.ocr.serv.shop.vo.ShopProductAttrSaveVo;
import com.jnzc.ocr.serv.shop.vo.ShopProductSaveVo;

import java.util.List;

/**
 * @author zhangcm
 * @version 1.0, 2017-09-29
 */
public interface ShopProductAttrService extends MybatisService<ShopProductAttr, ShopProductAttrFilter> {

    List<Tree<ShopProductAttr>> listTree(Long shopId);

    List<Tree<ShopProductAttr>> listTree(Long parentId, Long categoryId, Long shopId);

    ShopProductAttr find(Long id, Long parentId, Long shopId);

    List<Long> listIdByParentId(Long parentId, Long shopId);

    List<Long> listIdByProductId(Long productId, Long shopId);

    ShopProductAttr save(ShopProductAttrSaveVo param, Long shopId);

    void save(List<ShopProductSaveVo.Sku> paramList, ShopProduct product);

    void delete(Long id, Long shopId);

    void deleteByProductId(Long productId, Long shopId);
}
